package com.wy.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author 王昭贵
 * @since 2023-01-27
 */
@Data
@TableName("shop_cart")
@ApiModel(value = "ShopCart对象", description = "")
public class ShopCart implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户id")
    private Integer customerId;

    @ApiModelProperty("药物id")
    private Integer drugId;

    @ApiModelProperty("数量")
    private Integer count;

    @ApiModelProperty("加购时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("选中状态")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Integer selected;

    @TableField(exist = false)
    private Drug drug;

}
